PROJECT(QuadProg)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_CAPITALIZED)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
ADD_DEFINITIONS(-DUNICODE)

#Use MFC in a Shared DLL
ADD_DEFINITIONS(-D_AFXDLL)
SET(CMAKE_MFC_FLAG 2)

FILE(GLOB_RECURSE HDRS_FILES *.h *.hpp)
FILE(GLOB_RECURSE SRCS_FILES *.cpp)
FILE(GLOB_RECURSE UI_FILES *.ui)
FILE(GLOB CD_FILES *.cd)


SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SRCS_FILES} ${UI_FILES} ${HDRS_FILES} PARENT_SCOPE)

SOURCE_GROUP("UI Files" FILES ${UI_FILES})
SOURCE_GROUP("Generated Files" FILES ${MOC_SRCS} ${UI_HDRS} ${RSC_SRCS})
SOURCE_GROUP("Class Diagrams" FILES ${CD_FILES} )
#SOURCE_GROUP("Resources" FILES ${RSCS} )

ADD_LIBRARY(${PROJECT_NAME} STATIC ${HDRS_FILES} ${SRCS_FILES} ${UI_HDRS} ${UI_FILES} ${RSC_SRCS} ${MOC_SRCS} ${CD_FILES})
#ADD_DEPENDENCIES(${PROJECT_NAME})
SET_SOURCE_FILES_PROPERTIES(${CD_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) # DO NOT COMPILE CS FILES
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})	
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
